﻿//-----------------------------------------------------------------------
// <copyright file="ILogger.cs" company="SLWY Enterprises">
// * Copyright (C) 2017 四川商旅无忧科技有限公司 版权所有。
// * version : 1.0
// * author  : qinchaoyue
// * FileName: ILogger.cs
// * history : created by qinchaoyue 2017-11-10 03:27:41
// </copyright>
//-----------------------------------------------------------------------

namespace Slwy.Logger.Contracts
{
    using System;

    using Slwy.Logger.Models;

    /// <summary>
    /// 日志方法定义
    /// </summary>
    public interface ILogger
    {
        /// <summary>
        /// 写入 acc 日志消息
        /// </summary>
        /// <param name="message">日志内容</param>
        void Acc(AccModel message);

        /// <summary>
        /// 写入 Debug 日志消息
        /// </summary>
        /// <param name="message"> 日志消息 </param>
        /// <param name="errorCode"> The error Code.  </param>
        /// <param name="context"> The context.  </param>
        /// <param name="key1"> The key 1.  </param>
        /// <param name="key2"> The key 2.  </param>
        /// <param name="key3"> The key 3.  </param>
        void Debug(string message, string errorCode = "", string context = "", string key1 = "", string key2 = "", string key3 = "");

        /// <summary>
        /// 写入 error 日志消息
        /// </summary>
        /// <param name="message"> 日志消息 </param>
        /// <param name="errorCode"> The error Code.  </param>
        /// <param name="context"> The context.  </param>
        /// <param name="key1"> The key 1.  </param>
        /// <param name="key2"> The key 2.  </param>
        /// <param name="key3"> The key 3.  </param>
        void Info(string message, string errorCode = "", string context = "", string key1 = "", string key2 = "", string key3 = "");

        /// <summary>
        /// 写入 error 日志消息
        /// </summary>
        /// <param name="message"> 日志消息 </param>
        /// <param name="errorCode"> The error Code.  </param>
        /// <param name="context"> The context.  </param>
        /// <param name="key1"> The key 1.  </param>
        /// <param name="key2"> The key 2.  </param>
        /// <param name="key3"> The key 3.  </param>
        void Error(string message, string errorCode = "", string context = "", string key1 = "", string key2 = "", string key3 = "");

        /// <summary>
        /// 写入 error 日志消息
        /// </summary>
        /// <param name="model">日志内容</param>
        void Error(ExceptionModel model);

        /// <summary>
        /// 写入 error 日志消息
        /// </summary>
        /// <param name="e"> The e.  </param>
        /// <param name="errorCode"> The error code.  </param>
        /// <param name="key1"> The key 1.  </param>
        /// <param name="key2"> The key 2.  </param>
        /// <param name="key3"> The key 3.  </param>
        void Error(Exception e, string errorCode = "", string key1 = "", string key2 = "", string key3 = "");

        /// <summary>
        /// 写入 Warn 日志消息
        /// </summary>
        /// <param name="message"> The message.  </param>
        /// <param name="errorCode"> The error Code.  </param>
        /// <param name="context"> The context.  </param>
        /// <param name="key1"> The key 1.  </param>
        /// <param name="key2"> The key 2.  </param>
        /// <param name="key3"> The key 3.  </param>
        void Warn(string message, string errorCode = "", string context = "", string key1 = "", string key2 = "", string key3 = "");

        /// <summary>
        /// 交互日志
        /// </summary>
        /// <param name="businessName">模块名|业务模块</param>
        /// <param name="thisMethodNote">方法说明|方法注释说明</param>
        /// <param name="sendAddress">发送地址|交互的接口地址</param>
        /// <param name="sendData">发送内容|发送的内容参数</param>
        /// <param name="responseData">接收内容|接收返回的内容信息</param>
        /// <param name="keyInfomation">关键信息|关系信息说明</param>
        /// <param name="sendType">交互类型|Post,Get，可为空</param>
        void Interactive(string businessName, string thisMethodNote, string sendAddress, string sendData, string responseData, string keyInfomation = "", string sendType = "");
    }
}
